import { defHttp } from "@/utils/http";
import { baseUrlApi } from "./utils";

/** 生产任务详情列表分页查询 */
export const getProduceTaskPageList = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/produceTask/taskDetailPageList"),
    data
  });
};
/** 生产任务状态数量统计 */
export const getProduceTaskStatusStatistics = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/produceTask/statusStatistics"),
    data
  });
};
/** 查询报工历史记录 */
export const getProduceTaskQueryReportHistoryList = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/produceTask/queryReportHistoryList"),
    data
  });
};
/** 查询下级物料库存 */
export const getProduceTaskQueryPageLowerMaterialStock = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/produceTask/queryPageLowerMaterialStock"),
    data
  });
};
/** 分页查询生产任务列表 */
export const getProduceTaskQueryPageList = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/produceTask/queryPageList"),
    data
  });
};
/** 根据客户名称模糊查询客户编码 */
export const getProduceTaskQueryCustomerCodeByName = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/produceTask/queryCustomerCodeByName"),
    data
  });
};
/** 生产报工 */
export const setProduceTaskProduceReport = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/produceTask/produceReport"),
    data
  });
};
/** 创建生产任务 */
export const setProduceTaskCreateTask = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/produceTask/createTask"),
    data
  });
};
/** 查询所有物料名称与物料编码的信息 */
export const setProduceTaskQueryMaterialInfo = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/produceTask/queryMaterialInfo"),
    data
  });
};
